]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ci: Handle POTFILES.skip in potfiles check
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 10 Mar 2020 00:39:09 +0000 (01:39 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 7 Apr 2020 20:27:00 +0000 (20:27 +0000)
Allow marking files as ignored when searching for translatable
strings, similar to "good" ol' intltool.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812

.gitlab-ci/check-potfiles.sh

index 51cbdd89a2dd18ade26036f13361430a0efe4985..8785eb8077e7ef29fd47d1ac2941b2a6f07fa0c0 100755 (executable)
@@ -6,6 +6,11 @@ globs=('*.js' '*.c')
 # find source files that contain gettext keywords
 files=$(grep -lR ${globs[@]/#/--include=} '\(gettext\|[^I_)]_\)(' $srcdirs)
 
+# filter out excluded files
+if [ -f po/POTFILES.skip ]; then
+  files=$(for f in $files; do ! grep -q ^$f po/POTFILES.skip && echo $f; done)
+fi
+
 # find those that aren't listed in POTFILES.in
 missing=$(for f in $files; do ! grep -q ^$f po/POTFILES.in && echo $f; done)